package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SaleOrderApprovalMapper;
import com.ruoyi.system.domain.SaleOrderApproval;
import com.ruoyi.system.service.ISaleOrderApprovalService;
import com.ruoyi.common.core.text.Convert;

/**
 * 销售订单审核Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class SaleOrderApprovalServiceImpl implements ISaleOrderApprovalService 
{
    @Autowired
    private SaleOrderApprovalMapper saleOrderApprovalMapper;

    /**
     * 查询销售订单审核
     * 
     * @param approvalId 销售订单审核主键
     * @return 销售订单审核
     */
    @Override
    public SaleOrderApproval selectSaleOrderApprovalByApprovalId(Long approvalId)
    {
        return saleOrderApprovalMapper.selectSaleOrderApprovalByApprovalId(approvalId);
    }

    /**
     * 查询销售订单审核列表
     * 
     * @param saleOrderApproval 销售订单审核
     * @return 销售订单审核
     */
    @Override
    public List<SaleOrderApproval> selectSaleOrderApprovalList(SaleOrderApproval saleOrderApproval)
    {
        return saleOrderApprovalMapper.selectSaleOrderApprovalList(saleOrderApproval);
    }

    /**
     * 新增销售订单审核
     * 
     * @param saleOrderApproval 销售订单审核
     * @return 结果
     */
    @Override
    public int insertSaleOrderApproval(SaleOrderApproval saleOrderApproval)
    {
        return saleOrderApprovalMapper.insertSaleOrderApproval(saleOrderApproval);
    }

    /**
     * 修改销售订单审核
     * 
     * @param saleOrderApproval 销售订单审核
     * @return 结果
     */
    @Override
    public int updateSaleOrderApproval(SaleOrderApproval saleOrderApproval)
    {
        return saleOrderApprovalMapper.updateSaleOrderApproval(saleOrderApproval);
    }

    /**
     * 批量删除销售订单审核
     * 
     * @param approvalIds 需要删除的销售订单审核主键
     * @return 结果
     */
    @Override
    public int deleteSaleOrderApprovalByApprovalIds(String approvalIds)
    {
        return saleOrderApprovalMapper.deleteSaleOrderApprovalByApprovalIds(Convert.toStrArray(approvalIds));
    }

    /**
     * 删除销售订单审核信息
     * 
     * @param approvalId 销售订单审核主键
     * @return 结果
     */
    @Override
    public int deleteSaleOrderApprovalByApprovalId(Long approvalId)
    {
        return saleOrderApprovalMapper.deleteSaleOrderApprovalByApprovalId(approvalId);
    }
}
